package com.exam.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.exam.demo.domain.Business;
import org.apache.ibatis.annotations.Select;


import java.util.List;
import java.util.Map;


public interface BusinessMapper extends BaseMapper<Business> {

   @Select("select DATE_FORMAT(start_date,'%Y-%m') as `month`,count(*) as `people` from t_business\n" +
           "        group BY (DATE_FORMAT(start_date,'%Y-%m'))")
   public List<Map<String, Object>> selectChart() ;

}
